package flink.examples;

import org.apache.flink.annotation.Internal;
import org.apache.flink.api.common.RuntimeExecutionMode;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author : wuxinquan
 * @date: 2024/6/4 - 06 - 04 - 9:22
 * @Description: flink.examples
 * @version: 1.0
 */
public class FlinkDemo1 {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env =StreamExecutionEnvironment.getExecutionEnvironment();
        env.setRuntimeMode(RuntimeExecutionMode.STREAMING);
        List<Integer> list = Arrays.asList(1, 22, 3);
        DataStreamSource<Integer> ds = env.fromCollection(list);
        ds.print();
        env.execute();
    }
}
